Skip to content

fix(common): correct JSON schema primitive type definitions#44935

Merged
Crow-Control merged 6 commits intocommon2026from
copilot/sub-pr-41017-again
Feb 14, 2026
Merged

fix(common): correct JSON schema primitive type definitions#44935
Crow-Control merged 6 commits intocommon2026from
copilot/sub-pr-41017-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

The common chart JSON schemas incorrectly defined primitive types (boolean, string, integer) as "type": "object", causing helm lint validation failures across 797 stable charts.

Changes

Schema Type Corrections

  • persistence.json: Fixed 20+ fields including enabled (boolean), mountPath (string), items (array), size/hostPath (string)
  • service.json: Fixed enabled (boolean), port/targetPort (integer), type/targetSelector (string)
  • workload.json: Fixed container fields (enabled/primary → boolean, imageSelector → string), podSpec fields (hostNetwork/terminationGracePeriodSeconds → boolean/integer), probe port["integer", "string"], envFrom → array, args/command → string|array
  • rbac.json: Fixed enabled/primary/clusterWide/allServiceAccounts → boolean, rules → array
  • serviceAccount.json: Fixed enabled/primary/targetSelectAll → boolean
  • configmap.json, secret.json, operator.json: Fixed enabled → boolean
  • hostNetwork.json: Fixed root type → boolean

Example Fix

// Before
"enabled": {
  "type": "object",
  "properties": {},
  "additionalProperties": true
}

// After
"enabled": {
  "type": "boolean"
}

Impact

  • Before: Validation failures across most charts
  • After: 755/797 charts passing (94.7%)
  • Remaining failures: 42 charts with Helm template strings (e.g., "{{ .Values.x }}") in typed fields - valid Helm usage, not schema bugs

Testing

Validated with python3 test_schema.py against all stable charts.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits February 14, 2026 14:53
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
…r, rbac, serviceAccount

Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove env-list support and improve network policy fix(common): correct JSON schema primitive type definitions Feb 14, 2026
Copilot AI requested a review from Crow-Control February 14, 2026 15:18
@Crow-Control Crow-Control marked this pull request as ready for review February 14, 2026 15:19
Copilot AI review requested due to automatic review settings February 14, 2026 15:19
@Crow-Control Crow-Control merged commit 2329ec8 into common2026 Feb 14, 2026
2 checks passed
@Crow-Control Crow-Control deleted the copilot/sub-pr-41017-again branch February 14, 2026 15:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a critical JSON schema validation issue in the common library chart where primitive types (boolean, string, integer, array) were incorrectly defined as "type": "object" with empty properties and additionalProperties: true. This caused helm lint validation failures across 797 stable charts.

Changes:

  • Corrected primitive type definitions across 9 schema files (persistence, service, workload, rbac, serviceAccount, configmap, secret, operator, hostNetwork)
  • Changed boolean fields from object to "type": "boolean" (e.g., enabled, primary, readOnly)
  • Changed string fields from object to "type": "string" (e.g., mountPath, hostPath, type, imageSelector)
  • Changed integer fields from object to "type": "integer" (e.g., port, targetPort, runAsUser, runAsGroup)
  • Changed port fields to "type": ["integer", "string"] to support both numeric ports and Helm template strings
  • Changed command/args fields to use oneOf pattern supporting both string and array types
  • Changed collection fields from object to proper array types (e.g., rules, envFrom, items)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
charts/library/common/test_output.txt New file documenting the validation error that this PR fixes (showing errors before the fix)
charts/library/common/schemas/workload.json Fixed 50+ primitive type definitions including container fields (enabled, primary, imageSelector), security context (runAsUser, runAsGroup, privileged, etc.), probe ports (integer|string), command/args (string|array via oneOf), envFrom (array), and podSpec fields (hostNetwork, terminationGracePeriodSeconds, etc.)
charts/library/common/schemas/serviceAccount.json Fixed enabled, primary, and targetSelectAll from object to boolean
charts/library/common/schemas/service.json Fixed enabled, type, targetSelector to proper types; fixed port fields (port, targetPort, nodePort, hostPort) from object to integer; fixed protocol to string
charts/library/common/schemas/secret.json Fixed enabled from object to boolean, type from object to string
charts/library/common/schemas/rbac.json Fixed enabled, primary, clusterWide, allServiceAccounts to boolean; changed rules from object to array with items; changed rules array fields (apiGroups, resources, resourceNames, verbs) from object to array
charts/library/common/schemas/persistence.json Fixed 15+ fields including enabled/readOnly/targetSelectAll (boolean), size/hostPath/mountPath/medium (string), items (array), and targetSelector mounts (string/boolean)
charts/library/common/schemas/operator.json Fixed enabled and register from object to boolean
charts/library/common/schemas/hostNetwork.json Fixed root type from object to boolean
charts/library/common/schemas/configmap.json Fixed enabled from object to boolean

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Crow-Control added a commit that referenced this pull request Feb 14, 2026
The common chart JSON schemas incorrectly defined primitive types
(boolean, string, integer) as `"type": "object"`, causing helm lint
validation failures across 797 stable charts.

## Changes

### Schema Type Corrections
- **persistence.json**: Fixed 20+ fields including `enabled` (boolean),
`mountPath` (string), `items` (array), `size`/`hostPath` (string)
- **service.json**: Fixed `enabled` (boolean), `port`/`targetPort`
(integer), `type`/`targetSelector` (string)
- **workload.json**: Fixed container fields (`enabled`/`primary` →
boolean, `imageSelector` → string), podSpec fields
(`hostNetwork`/`terminationGracePeriodSeconds` → boolean/integer), probe
`port` → `["integer", "string"]`, `envFrom` → array, `args`/`command` →
string|array
- **rbac.json**: Fixed
`enabled`/`primary`/`clusterWide`/`allServiceAccounts` → boolean,
`rules` → array
- **serviceAccount.json**: Fixed `enabled`/`primary`/`targetSelectAll` →
boolean
- **configmap.json**, **secret.json**, **operator.json**: Fixed
`enabled` → boolean
- **hostNetwork.json**: Fixed root type → boolean

### Example Fix
```json
// Before
"enabled": {
  "type": "object",
  "properties": {},
  "additionalProperties": true
}

// After
"enabled": {
  "type": "boolean"
}
```

## Impact
- **Before**: Validation failures across most charts
- **After**: 755/797 charts passing (94.7%)
- **Remaining failures**: 42 charts with Helm template strings (e.g.,
`"{{ .Values.x }}"`) in typed fields - valid Helm usage, not schema bugs

## Testing
Validated with `python3 test_schema.py` against all stable charts.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Crow-Control added a commit that referenced this pull request Feb 15, 2026
The common chart JSON schemas incorrectly defined primitive types
(boolean, string, integer) as `"type": "object"`, causing helm lint
validation failures across 797 stable charts.

## Changes

### Schema Type Corrections
- **persistence.json**: Fixed 20+ fields including `enabled` (boolean),
`mountPath` (string), `items` (array), `size`/`hostPath` (string)
- **service.json**: Fixed `enabled` (boolean), `port`/`targetPort`
(integer), `type`/`targetSelector` (string)
- **workload.json**: Fixed container fields (`enabled`/`primary` →
boolean, `imageSelector` → string), podSpec fields
(`hostNetwork`/`terminationGracePeriodSeconds` → boolean/integer), probe
`port` → `["integer", "string"]`, `envFrom` → array, `args`/`command` →
string|array
- **rbac.json**: Fixed
`enabled`/`primary`/`clusterWide`/`allServiceAccounts` → boolean,
`rules` → array
- **serviceAccount.json**: Fixed `enabled`/`primary`/`targetSelectAll` →
boolean
- **configmap.json**, **secret.json**, **operator.json**: Fixed
`enabled` → boolean
- **hostNetwork.json**: Fixed root type → boolean

### Example Fix
```json
// Before
"enabled": {
  "type": "object",
  "properties": {},
  "additionalProperties": true
}

// After
"enabled": {
  "type": "boolean"
}
```

## Impact
- **Before**: Validation failures across most charts
- **After**: 755/797 charts passing (94.7%)
- **Remaining failures**: 42 charts with Helm template strings (e.g.,
`"{{ .Values.x }}"`) in typed fields - valid Helm usage, not schema bugs

## Testing
Validated with `python3 test_schema.py` against all stable charts.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
@truecharts-admin
Copy link
Copy Markdown
Contributor

This PR is locked to prevent necro-posting on closed PRs. Please create a issue or contact staff on discord if you want to further discuss this

@trueforge-org trueforge-org locked as resolved and limited conversation to collaborators Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants